//
//  CustomMenuItem.swift
//  Casecord
//
//  Created by baozi on 2024/1/10.
//

import SwiftUI

struct CustomMenuItem: View {
    var title: String
    var image: String
    var onTap: () -> Void
    var body: some View {
        HStack {
            HStack {
                Image(systemName: image)
                Text(title)
            }
            Spacer()
            Image(systemName: "arrow.right")
                .resizable()
                .frame(width: 20, height: 15)
                .scaledToFit()
        }
        .foregroundColor(Theme.color.primaryBackgroundColor)
        .frame(height: 50)
        .paddingHorizontal(15)
        .background(Color.white)
        .cornerRadius(15)
        .paddingHorizontal(10)
        .shadow(color: Color.black.opacity(0.2), radius: 6)
        .onTapGesture {
            onTap()
        }
    }
}

#Preview {
    CustomMenuItem(title: "", image: "") {
        
    }
}
